# 用户类
class User:
    id = ""
    # 用户属性
    username = ""          # 姓名
    password = ""
    email = ""
    number = ""
    create_time = ""
    auth = ""

    # 构造方法，初始化用户对象
    def __init__(self, username):
        self.username = username

    # 静态方法，从字典解码用户信息
    @staticmethod
    def decode(user_dict):
        user = User(user_dict['username'])
        user.password = user_dict['password']
        user.email = user_dict['email']
        return user




